// compontents/navie/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title: String,
    first: Boolean,
    lates: Boolean
  },

  /**
   * 组件的初始数据
   */
  data: {
    lefSrc: 'images/triangle@left.png',
    disLeft: 'images/triangle.dis@left.png',
    rightSrc: 'images/triangle@right.png',
    disRight: 'images/triangle.dis@right.png'
  },

  /**
   * 组件的方法列表
   */
  methods: {
    clickLeft: function(){
      if(this.properties.lates){
        this.triggerEvent('clickLeft')
      }
    },
    clickRight: function(){
      if(this.properties.first){
        this.triggerEvent('clickRight')
      }
    }
  }
})
